package demomoreinher;

public class Fish extends Animal implements ISwimming{//如果这里游泳写出类，java是不支持多继承的，所有说接口解决了多继承问题
    public Fish(String name, int age) {
        super(name, age);
    }

    @Override
    public void eat() {
        System.out.println(this.name+"吃鱼粮！");
    }

    @Override
    public void swim() {
        System.out.println(this.name+"游泳~");
    }
}
